package org.biloxi.player.actions;

import org.biloxi.commands.CommandRepository;
import org.biloxi.model.GameState;
import org.biloxi.model.player.PlayerState;

public abstract class PlayerAction<O>  {	
	public final ActionOptionPair<O> do_(O options){
		return new ActionOptionPair<O>(this, options);
	}
	public abstract void execute(GameState gs, PlayerState ps, CommandRepository cmd, O options);
	
	/**
	 * Determines whether this action is legal given the Options, GameState and Player.
	 * 
	 * @param gs
	 * @param ps
	 * @param options
	 * @return
	 */
	public abstract boolean isLegal(GameState gs, PlayerState ps, O options);
}
